import type { AppRouteModule } from '/@/router/types'

import { t } from '/@/hooks/web/useI18n'
import { LAYOUT } from '/@/router/constant'

const vibratingScreen: Array<AppRouteModule> = [
  {
    path: '/main',
    name: 'main',
    component: LAYOUT,
    redirect: '/main/index',
    meta: {
      title: t('routes.dashboard.dashboard'),
    },
    children: [
      {
        path: '/main/index',
        name: 'Workbench',
        component: () => import('/src/views/vibratingScreen/machineConfig/index.vue'),
        meta: {
          title: '机器配置',
        },
      },
      {
        path: '/main/overview',
        name: 'overview',
        component: () => import('/src/views/vibratingScreen/machineOverview/index.vue'),
        meta: {
          // affix: true,
          title: '机器总览',
        },
      },
      {
        path: '/main/stateVariables',
        name: 'stateVariables',
        component: () => import('/@/views/vibratingScreen/stateVariables/index.vue'),
        meta: {
          // affix: true,
          title: '状态变量配置',
        },
      },
      {
        path: '/main/trendDiagrams',
        name: 'trendDiagrams',
        component: () => import('/@/views/vibratingScreen/trendDiagrams/index.vue'),
        meta: {
          // affix: true,
          title: '趋势诊断',
        },
      },
      {
        path: '/main/expertDiagrams',
        name: 'expertDiagrams',
        component: () => import('/@/views/vibratingScreen/expertDiagrams/index.vue'),
        meta: {
          // affix: true,
          title: '专家诊断',
        },
      },
      {
        path: '/main/machineConfig/:machineId',
        name: 'MachineConfig',
        component: () => import('/src/views/vibratingScreen/machineConfig/components/MachineConfigDetail.vue'),
        meta: {
          title: '机器配置详情',
          hideMenu: true,
        },
      },
      {
        path: '/main/overviewDetail/:machineId',
        name: 'OverviewDetail',
        component: () => import('/src/views/vibratingScreen/machineOverview/components/OverviewDetail.vue'),
        meta: {
          title: '机器总览详情',
          hideMenu: true,
        },
      },
      // {
      //   path: '/main/sensorData',
      //   name: 'sensorData',
      //   component: () => import('/@/views/vibratingScreen/sensor/index.vue'),
      //   meta: {
      //     title: '传感器数据',
      //   },
      // },
    ],

  },
]

// const dashboard: AppRouteModule = {
//   path: '/dashboard',
//   name: '仪表盘',
//   component: LAYOUT,
//   redirect: '/dashboard/workbench',
//   meta: {
//     orderNo: 1,
//     icon: 'ion:grid-outline',
//     title: t('routes.dashboard.dashboard'),
//   },
//   children: [
//     {
//       path: 'workbench',
//       name: 'Workbench',
//       component: () => import('/@/views/dashboard/workbench/index.vue'),
//       meta: {
//         title: t('routes.dashboard.workbench'),
//       },
//     },
//     {
//       path: 'analysis',
//       name: 'Analysis',
//       component: () => import('/@/views/dashboard/analysis/index.vue'),
//       meta: {
//         // affix: true,
//         title: t('routes.dashboard.analysis'),
//       },
//     },
//     {
//       path: 'track',
//       name: 'Track',
//       component: () => import('/@/views/dashboard/analysis/index.vue'),
//       meta: {
//         // affix: true,
//         title: t('routes.dashboard.track'),
//       },
//     },
//   ],
// }

export default vibratingScreen
